#!/bin/bash

if ! test -e ./index.html; then
  echo "./index.html doesn't exit!"
  exit;
fi

echo -n "gchar log2html_html[] =" > ../pages.h
cat ./index.html | sed -e 's/"/\\"/g' -e 's/$/\\n"/g' -e 's/^/"/g' >> ../pages.h
echo ";" >> ../pages.h
